<div class="feeds index">
<h2><?php __('Feeds');?></h2>

<?php
foreach($feeds as $feed) {
	echo <<<EOD
	<div title="{$feed['Feed']['id']}__{$feed['Feed']['url']}" class="rssfeed">
		<h3>
			{$feed['Feed']['name']}
			&nbsp;
			<small>
				<a href="/feeds/view/{$feed['Feed']['id']}">view</a>
				<a href="/feeds/edit/{$feed['Feed']['id']}">edit</a>
			</small>
		</h3>
	</div>
EOD;
}
?>
</div>
<div class="breaker"></div>
<div class="actions">
	<ul>
		<li><?php echo $html->link(__('New Feed', true), array('action'=>'add')); ?></li>
		<li><?php echo $html->link(__('List Favorites', true), array('controller'=> 'favorites', 'action'=>'index')); ?> </li>
		<li><?php echo $html->link(__('New Favorite', true), array('controller'=> 'favorites', 'action'=>'add')); ?> </li>
	</ul>
</div>


<script>
	$(document).ready(function() {
		$('div.rssfeed').each(function() {
			$(this).append($('<div>').load('/feeds/show?feed='+this.title)).attr('title',this.title.split('__')[1])
			});
	});
</script>